@extends('adminDialog')
@section('content')
    <form action="{{url('admin/goods/update/'.$model->id)}}" method="POST" class="J_ajaxForm">
        <input type="hidden" name="_token" value="{{ csrf_token() }}">
        <div class="pop_cont pop_table">
            <table width="100%">
                <tbody>
                
                <tr>
                    <th><label for="title">商品名称 <span class="red">*</span></label></th>
                    <td><input type="text" id="title" name="title" class="input length_3" value="{{ $model->title }}"/></td>
                </tr>

                <tr>
                    <th><label for="">店铺</label></th>
                    <td> {{ $model->store->store_name }}</td>
                </tr>

                <tr>
                    <th><label for="">商品主图</label></th>
                    <td><img src="/img/goods-{{ $model->pic }}/200-80" /></td>
                </tr>

                <tr>
                    <th><label for="price">价格 <span class="red">*</span></label></th>
                    <td>
                        <input type="number" name="price" id="price" class="input length_2" value="{{$model->price}}"/> 元
                    </td>
                </tr>

                <tr>
                    <th><label for="market_price">市场价 <span class="red">*</span></label></th>
                    <td>
                        <input type="number" name="market_price" id="market_price" class="input length_2" value="{{$model->market_price}}"/> 元
                    </td>
                </tr>

                <tr>
                    <th><label for="goods_type">团购</label></th>
                    <td>
                        <input type="radio" @if($model->goods_type) checked="checked" @endif name="goods_type" value="1" id="type_1"/><label for="type_1">是</label>
                        <input type="radio" @if(!$model->goods_type) checked="checked" @endif name="goods_type" value="0" id="type_2"/><label for="type_2">否</label>
                    </td>
                </tr>

                <tr>
                    <th><label for="content">详情</label></th>
                    <td>
                        <textarea name="content" id="content" style="width:200px; height: 50px;">{{ $model->content }}</textarea>
                    </td>
                </tr>

                <tr>
                    <th><label for="notice">须知</label></th>
                    <td>
                        <textarea name="notice" id="notice" style="width:200px; height: 50px;">{{ $model->notice }}</textarea>
                    </td>
                </tr>

                <tr>
                    <th><label for="status">状态</label></th>
                    <td>
                        <input type="radio" @if($model->status) checked="checked" @endif name="status" value="1" id="status_1"/><label for="status_1">上架</label>
                        <input type="radio" @if(!$model->status) checked="checked" @endif name="status" value="0" id="status_2"/><label for="status_2">下架</label>
                    </td>
                </tr>

                </tbody>
            </table>
        </div>

        <div class="pop_bottom cc">
            <button type="reset" class="btn fr" id="J_dialog_close">取消</button>
            <button type="submit" class="btn btn_submit J_ajax_submit_btn fr mr10" id="J_dialog_close">提交</button>
        </div>
    </form>
@stop

@section('style')
    <style>
        .body_none {width: 320px;}
    </style>
@stop

